Currently we make entries and buttons insensitive and do some checks
before calling the GcrPrompt implementation to complete. However, if
checks get failed, for example, new passwords mismatched due to typo,
we should make entries and buttons sensitive again to allow user to
correct it.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3757>
(cherry picked from commit
889a46670d81fbbdf6c856e16094617ead4ca035)
_onContinueButton() {
this._updateSensitivity(false);
- this.prompt.complete();
+ if (this.prompt.complete())
+ return;
+ // Allow user to correct it when passwords mismatch.
+ this._updateSensitivity(true);
+ if (this.prompt.password_visible)
+ this._passwordEntry.grab_key_focus();
}
_onCancelButton() {